import React from 'react';
import dynamic from 'dva/dynamic';
import { Route } from 'dva/router';
//import { Switch } from 'dva/router';

//import SearchBarMy from '../components/SearchBar/SearchBar';
//import NavBottomBar from '../components/NavBottomBar/NavBottomBar';

export default function TestRoute(app) {
    // const MyRoute = dynamic({
    //   app,
    //   models: () => {
    //     return [
    //     //  import('../models/app/app'),
    //     ];
    //   },
    //   component: () => import('../routes/app/app'),
    // });
    const Test = dynamic({
        app,
        models: () => {
            return [
                import('../models/home/HomeModel'),
            ];
        },
        component: () => import('../routes/test/test'),
    });

    // const SearchBarMy=dynamic({
    //   app,
    //   models: () => {
    //     return [
    //       //import('../models/homeModel/Home'),
    //     ]
    //   },
    //   component: () => import('../components/SearchBar/SearchBar'),
    // });


    // const GoodsClass = dynamic({
    //   app,
    //   models: () => {
    //     return [
    //       import('../models/goodsClass/goodsClassModel'),
    //     ];
    //   },
    //   component: () => import('../routes/goodsClass/goodsClass'),
    // });

    return (
        [
            <Route key="/test" exact path="/test" component={Test}/>
        ]
    );
}
